<template>
  <!-- 当月施工方案电子审批数量对比 -->
   <a-table class="takeOut-hover" :columns="columns" bordered :pagination="false" :data-source="tableData" >
     <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record,index">
       {{noValue(record[col.dataIndex],index,col.dataIndex)}}
     </template>
  </a-table>
</template>
<script>

import { summaryMixin } from "./mergeCell";
export default {
  mixins:[summaryMixin], //混入文件
  name: 'a' + Date.now(),
  props: {
    tableData: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    this.columns = [
      // { title: '序号', align: 'center',dataIndex: 'serial',width:'4%',scopedSlots: { customRender: 'serial' } },
      {
        title: '所属分公司',
        align: 'center',
        dataIndex: 'branchComId',
        colSpan: 2,
        width:'22%',
        customRender: (value, row, index) => { 
          const obj = {
            children: row.branchCompany,
            attrs: {}
          }
          obj.attrs.rowSpan = this.mergeCellKey(row.branchComId, this.tableData, 'branchComId');
          return obj
        }
        
      },
      { title: '计划', align: 'center', dataIndex: 'actualOrPlan',width:'13%',  colSpan: 0,scopedSlots: { customRender: 'actualOrPlan' }},
      { title: '施组设计', dataIndex: 'planSz', align: 'center',width:'13',scopedSlots: { customRender: 'planSz' }},
      { title: 'A', dataIndex: 'planA', align: 'center',width:'13%',scopedSlots: { customRender: 'planA' }},
      { title: 'B', dataIndex: 'planB', align: 'center', width:'13%',scopedSlots: { customRender: 'planB' }},
      { title: 'CD', dataIndex: 'planCd', align: 'center',width:'13%', scopedSlots:{ customRender: 'planCd' } },
      { title: '合计', dataIndex: 'planTotal', align: 'center', width:'13%',scopedSlots: { customRender: 'planTotal' }},
    ]
    return {
    }
  },
  methods: {

  },
  mounted() {
  }
}
</script>
<style lang="less">
</style>
